<script>
	export default {
		onLaunch: function() {
			
		},
		onShow: function() {
			// console.log("出现");
			const platform = uni.getSystemInfoSync().platform;
			// console.log(platform);
			if (platform === 'android' || platform === 'ios') {
				// #ifdef APP-PLUS
				const args = plus.runtime.arguments;
				if (args) {
					console.log(args);
					const questionMarkIndex = args.indexOf('?');
					if (questionMarkIndex !== -1) {
						const queryString = args.substring(questionMarkIndex + 1);
						console.log(queryString);
						const decodedQuery = decodeURIComponent(queryString);
						// 假设你要跳转到 userdetail 页面并传递参数
						const route = `/pages/tabBar/template/userDetailPage?aid=${decodedQuery}`;
						uni.navigateTo({
							url: route
						});
					}
				}
				// #endif
			}
		},
		onHide: function() {
			// console.log('App Hide')
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	@import '@/uni_modules/uni-scss/index.scss';
	/* #ifndef APP-PLUS-NVUE */
	/* uni.css - 通用组件、模板样式库，可以当作一套ui库应用 */
	@import './common/uni.css';
	@import '@/static/customicons.css';


	/* #endif*/

	/* 设置整个APP的背景颜色 */
	page {
		background-color: #f8f8f8;
	}
</style>